package net.koodar.forge.business.category.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.koodar.forge.mybatis.doman.BaseEntity;

import java.util.List;

/**
 * 商品分类表
 *
 * @author liyc
 */
@Data
@TableName("oms_category_attribute")
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class CategoryAttribute extends BaseEntity<CategoryAttribute> {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 属性名称
     */
    @TableField("name")
    private String name;

    /**
     * 属性编码
     */
    @TableField("code")
    private String code;

    /**
     * 分类ID
     */
    @TableField("category_id")
    private Long categoryId;

    /**
     * 表单方式 1单选2复选3文本4下拉 默认3
     */
    @TableField("form_type")
    private Integer formType;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;


    /**
     * 属性值
     */
    @TableField(exist = false)
    private List<CategoryAttributeValue> attributeValueList;

}
